//
//  mmjItemManager.m
//  Social
//
//  Created by seirra on 2018/5/13.
//  Copyright © 2018年 mmj. All rights reserved.
//

#import "mmjItemManager.h"

@implementation mmjItemManager
+(UIBarButtonItem *)itemwithimage:(NSString*)image highimage:(NSString *)highimage target:(id)target action :(SEL)action{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setImage:[UIImage imageNamed:image] forState:UIControlStateNormal
     ];
    [button setImage:[UIImage imageNamed:highimage] forState:UIControlStateHighlighted];
    [button addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
    [button sizeToFit];
    return [[UIBarButtonItem alloc]initWithCustomView:button];
}
@end
